import {
  get,
  getBuffer,
  post,
  postJson,
  postFile,
  patchJson,
  del,
  putJson,
  getData
} from "../http.js";
let api = process.env.VUE_APP_API;
if (process.env.VUE_APP_Mock == "true") {
  api = "/mock/";
}


// 评标任务 任务信息
export const taskinfo = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/task", p);

// 评标任务 项目视图
export const xmviewList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/xm_view", p);

// 评标任务 招标人视图
export const zbrviewList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/zbr_view", p);

// 评标任务 代理机构视图
export const dlviewList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/dl_view", p);

// 评标任务 评委视图
export const pbzjviewList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/pbzj_view", p);

// 评标任务 投标人视图
export const tbrviewList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/pbtask/tbr_view", p);

// 见证室设备
export const jzsDeviceList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/kbtask/jzs_device", p);
//呼叫、挂断
export const call = async (p) =>
  await postJson(api + "/witness/device/termTalk", p);
//呼叫、挂断历史
export const callRecord = async (p) =>
  await postJson(api + "/witness/weeon/buss/jzr/kbtask/call_record", p);
//广播设备
export const gbData = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/kbtask/gb_device", p);
//区域广播
export const qygb = async (p) =>
  await postJson(api + "/witness/device/termSpeak", p);
//文本广播
export const wbgb = async (p) =>
  await postJson(api + "/witness/device/textPlay", p);

export const warninginfolist = async (p) =>
  await post(api + "/witness/weeon/buss/warninginfo/findwarninginfolist", p);
// 保存广播放录
export const saveCommHis = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/kbtask/save_comm_his", p);
// 保存广播放录
export const commHisList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/kbtask/comm_his_list", p);

// 见证事项
export const jzsxinfo = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/zbtask/jzsx", p);
// 见证记录列表
export const jzrecordList = async (p) =>
  await post(api + "/witness/weeon/buss/jzr//zbtask/record_list", p);

// 删除见证记录
export const delJzrecord = async (p) =>
  await post(api + "/witness/weeon/buss/jzr/zbtask/del_record", p);
//现场预警
export const witnessalarmlist = async (p) =>
  await post(api + "/witness/weeon/buss/witnessalarm/findlist", p);
